<!--
 * @Author: your name
 * @Date: 2021-09-06 19:47:55
 * @LastEditTime: 2021-10-31 20:18:47
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \项目文件夹\xiangmu\ej-customer-cli\src\views\Order\order.vue
-->
<template>
  <div class="Order">
    <!-- 顶部导航栏 -->
    <van-sticky :offset-top="0">
      <van-nav-bar title="订单" />
    </van-sticky>
    <!-- 内容区 -->
    <van-tabs v-model="active">
      <van-tab title="全部订单"
        ><van-grid
          :border="false"
          direction="horizontal"
          justify="space-between"
          :clickable="true"
          v-for="(item, index) in Array.from(opagequeries.values())"
          :key="index"
        >
          <van-grid-item v-for="value in 2" :key="value"  >
            <div >{{ item.customer.username }}</div>
            <div >{{ item.status }}</div>
            <div >{{ item.address.address }}</div>
            <div >{{ item.certificationTime }}</div>
            <div >￥{ item.total }}</div>
          </van-grid-item>
        </van-grid>
      </van-tab>
      <van-tab title="待派单">待派单</van-tab>
      <van-tab title="待接单">待接单</van-tab>
      <van-tab title="待确认">待确认</van-tab>
      <van-tab title="已完成">已完成</van-tab>
    </van-tabs>
  </div>
</template>

<script>
import { mapActions, mapState } from "vuex";

export default {
  data() {
    return {
      active: 2,
    };
  },
  created() {
    this.finderOrderQuery();
  },
  computed: {
    ...mapState("order", ["opagequeries"]),
  },
  methods: {
    ...mapActions("order", ["finderOrderQuery"]),
  },
  components: {},
};
</script>

<style scoped>
</style>